const koaRouter = require("koa-router");

const peopleRouter = new koaRouter({ prefix: "/people" });

const { findAll, findByName,createPeople,findPage,deletePeople } = require("../controller/peopleController");
const {VerifyCreatePeopleInput}=require('../middleware/people.middleware')
peopleRouter.get("/allInfo", findAll);
peopleRouter.get("/getPeopleByPage", findPage);
peopleRouter.get("/deletePeopleByid", deletePeople);

peopleRouter.post("/createPeople", VerifyCreatePeopleInput,createPeople);
module.exports = peopleRouter;